package com.life.muyu.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * @Author zyb
 * @Date 2020-03-31 3:04 PM
 **/
@Controller
public class IndexController {

    @Value("${github.redirect.uri}")
    private String redirectUri;

    @GetMapping("/login")
    public String login(){
        return "loginpage";
    }

    @GetMapping("/")
    public String toIndex(Model model){
        model.addAttribute("redirectUri",redirectUri);
        return "index";
    }
}
